#include <stdio.h>
#include <stdlib.h>
#include "list.h"
#include "queue.h"

int io_queue_enqueue(io_queue *queue, const void *data)
{
	return io_list_ins_next(queue, io_list_tail(queue), data);
}

int io_queue_dequeue(io_queue *queue, void **data)
{
	void *el_data = NULL;
	int res = io_list_remove(queue, io_list_head(queue), (void**)&el_data);
	*data = el_data;
	return res;
}
